From 353280dc84e36265898529551cf6e07851fd6c86 Mon Sep 17 00:00:00 2001 From: "awilliam@lappy" Date: Tue, 20 Jun 2006 16:05:17 -0600 Subject: [PATCH] [IA64] Fix for ptc.ga emulation If switch to idle domain after vhpt_purge in ptc_ga emulation, shouldn't switch rr7 and pta. Only disable VHPT needed. If no, Smp VTi will hang whole system due to fault. Signed-off-by: Zhang xiantao Signed-off-by: Kevin Tian --- xen/arch/ia64/xen/regionreg.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/xen/arch/ia64/xen/regionreg.c b/xen/arch/ia64/xen/regionreg.c index e51485190e..cebed96efc 100644 --- a/xen/arch/ia64/xen/regionreg.c +++ b/xen/arch/ia64/xen/regionreg.c @@ -345,13 +345,19 @@ void load_region_regs(struct vcpu *v) void load_region_reg7_and_pta(struct vcpu *v) { - unsigned long rr7; + unsigned long rr7, pta; - ia64_set_pta(VHPT_ADDR | (1 << 8) | (VHPT_SIZE_LOG2 << 2) | - VHPT_ENABLED); + if (!is_idle_domain(v->domain)) { + ia64_set_pta(VHPT_ADDR | (1 << 8) | (VHPT_SIZE_LOG2 << 2) | + VHPT_ENABLED); - // TODO: These probably should be validated - rr7 = VCPU(v,rrs[7]); - if (!set_one_rr(0xe000000000000000L, rr7)) - panic_domain(0, "%s: can't set!\n", __func__); + // TODO: These probably should be validated + rr7 = VCPU(v,rrs[7]); + if (!set_one_rr(0xe000000000000000L, rr7)) + panic_domain(0, "%s: can't set!\n", __func__); + } + else { + pta = ia64_get_pta(); + ia64_set_pta(pta & ~VHPT_ENABLED); + } } -- 2.30.2